package com.fs.base.pojo;

import javax.persistence.Entity;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import org.apache.commons.beanutils.PropertyUtils;

/**
 * @author TiddlerCJ
 * @desc 菜单动作配置
 */
@Entity
@Table(name="s_menu_motion")
@Data@EqualsAndHashCode(callSuper=false) 
@NoArgsConstructor
public class MenuMotion extends PkEntity{
	private String motionCode;
	private String motionName;
	private String motionIcon;
	private Integer motionOrder = 0 ;
	private String menuId;
	private String motionId;
	/*
	 * 按钮显示位置0-列表显示，1-头部显示
	 */
	private Integer location = 0;
	
	public MenuMotion(String menuId,Motion motion){
		this.menuId = menuId;
		this.motionId = motion.getId();
		try {
			PropertyUtils.copyProperties(this,motion);
			this.setId(null);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
